<%--
  Created by IntelliJ IDEA.
  User: Jia_ly
  Date: 2016/2/7
  Time: 10:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path;
    request.setAttribute("basePath", basePath);
%>
<%@ include file="../frame/head.jsp" %>
<script src="${basePath}/resources/investigation/js/user/useList.js"></script>
<style>
    .holder {
        margin: 15px 0;
        float: right;
    }

    .holder a {
        font-size: 14px;
        cursor: pointer;
        color: #428bca;
        position: relative;
        padding: 8px 12px;
        text-decoration: none;
        background-color: #fff;
        border: 1px solid #ddd;
        border-right: none;
    }

    .holder a:hover {
        color: #2a6496;
        background-color: #eee;
    }

    .holder a.jp-next {
        border-top-right-radius: 4px;
        border-bottom-right-radius: 4px;
        border-right: 1px solid #ddd;
    }

    .holder a.jp-current, a.jp-current:hover {
        color: #FF4242;
        font-weight: bold;
    }

    .holder a.jp-disabled, a.jp-disabled:hover {
        color: #bbb;

    }

    .holder a.jp-current, a.jp-current:hover,
    .holder a.jp-disabled, a.jp-disabled:hover {
        cursor: default;
        background: none;
    }

    .holder span {
        margin: 0 5px;
    }
</style>
<html>
<body>
<section>
    <%@include file="../frame/top.jsp" %>
    <section class="boxMain">
        <section class="hbox stretch">
            <%@include file="../frame/aside.jsp" %>
            <div>
                <header>
                    <h3 style="color: #0b6cbc;text-align: center">用户列表</h3>
                </header>
                <hr>
                <div>
                    <table class="title-table">
                        <tr>
                            <td>
                                <input id="username" type="text" class="form-control" placeholder="用户名">
                            </td>
                            <td>
                                <input id="name" type="text" class="form-control" placeholder="姓名">
                            </td>
                            <td>
                                <select id="roleId" class="form-control">
                                    <option value="0">全部</option>
                                    <option value="1">管理员</option>
                                    <option value="2">老师</option>
                                    <option value="3">学生</option>
                                </select>
                            </td>
                            <td>
                                <button type="button" onclick="search()" class="btn btn-success">搜索</button>
                            </td>
                        </tr>
                    </table>
                </div>
                <br>
                <div id="list-content" class="">
                    <table class="table table-bordered">
                        <thead>
                        <tr class="success">
                            <td>序号</td>
                            <td>用户名</td>
                            <td>真实姓名</td>
                            <td>角色</td>
                            <td>创建日期</td>
                            <td>用户邮箱</td>
                            <td>操作</td>
                        </tr>
                        </thead>
                        <thead id="list">
                        <%--表格数据填充--%>
                        </thead>
                    </table>
                </div>
            </div>
            <div id="page" class="holder"></div>
        </section>
    </section>
</section>

<!-- 遮罩层  编辑框 -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span
                        class="sr-only">Close</span></button>
                <h4 class="modal-title" id="myModalLabel">修改信息</h4>
            </div>
            <div class="modal-body" align="center">
                <input id="userid" type="text" readonly hidden>
                <input id="truename" type="text" class="form-control" placeholder="真实姓名">
                <input id="error2" type="text" value="用户名不能为空" readonly style='color: red;border-left:0px;border-top:0px;border-right:0px;border-bottom:1px '>
                <br>
                <input id="mail" type="text" class="form-control" placeholder="邮箱">
                <input id="error" type="text" value="邮箱格式错误" readonly style='color: red;border-left:0px;border-top:0px;border-right:0px;border-bottom:1px '>
                <input id="error3" type="text" value="邮箱不能为空" readonly style='color: red;border-left:0px;border-top:0px;border-right:0px;border-bottom:1px '>
                <br>
                <select id="role" class="form-control">
                    <option value="1">管理员</option>
                    <option value="2">老师</option>
                    <option value="3" selected>学生</option>
                </select>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-success" onclick="edit()">确定</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>

<!-- 遮罩层  删除框 -->
<div class="modal fade" id="myModal2" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span
                        class="sr-only">Close</span></button>
                <input id="userid2" type="text" readonly hidden>
                <p style="font-size: 20px; color: red">确定删除该用户? 此操作不可逆!</p>
                <button type="button" class="btn btn-danger" onclick="del()">删除</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>
</body>
</html>